<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>其他信息录入</title>
  <!-- <link rel="shortcut icon" href="favicon.ico" /> -->

  <link rel="stylesheet" href="../../css/common.css">
  <link rel="stylesheet" href="../../css/AI_diagnosis_treament.css">
  <link rel="stylesheet" href="../../css/bootstrap/bootstrap.min.css" />
  <link rel="stylesheet" href="../../css/toastr.min.css" />
  <link rel="stylesheet" href="../../css/vant.min.css" />
</head>

<body>
  <!-- 版心 -->
  <div id="main">

    <!-- 内容 -->
    <div class="content">

      <!-- 头部区域 -->
      <div class="head">
        <div class="row">
          <div class="col">
            <!-- 医生姓名 -->
            <div class="doctor-info">
              <div class="image">
                <div class="text">医生</div>
                <img src="../../images/doctor_image.png" title="医生" alt="doctor_image" />
              </div>
              <div class="id">
                <div class="text">{{patientInfo.doctorId}}</div>
                <div class="name">{{patientInfo.doctorName}}</div>
              </div>
            </div>
          </div>
          <div class="col">
            <!-- 患者姓名 -->
            <div class="patient-info">
              <div class="image">
                <div class="text">患者</div>
                <img src="../../images/patient_image.png" title="患者" alt="patient_image" />
              </div>
              <div class="id">
                <div class="text">{{decryption(patientInfo.patientId)}}</div>
                <div class="name">{{decryption(patientInfo.name)}}</div>
              </div>
            </div>
          </div>
        </div>
        <!-- 操作按钮组 -->
        <!-- <div class="action-btn-group">
          
        </div> -->

      </div>
      <!-- <div class="row addButtonGroup">
        <div class="col">
          <button type="button" id="select_patient" @click="changePatient">选择患者<svg viewBox="0 0 24 24">
              <path
                d="M20.118 3H3.893A2.914 2.914 0 0 0 1.39 7.371L9.506 20.92a2.917 2.917 0 0 0 4.987.005l8.11-13.539A2.914 2.914 0 0 0 20.117 3z" />
            </svg></button>
        </div>
      </div> -->
      <!-- <nav class="navbar navbar-expand-lg navbar-light">
        <div class="container-fluid">
          <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
            操作栏
          </button>
          <div class="collapse navbar-collapse mt-2" id="navbarNav">
            <div class="container">
              <div class="row justify-content-center">
                  <div class="col-12 col-sm-4 col-md-3 col-lg-2 mb-2">
                      <button @click="changePatient" class="btn btn-primary w-100">
                          选择患者
                      </button>
                  </div>
                  <div class="col-12 col-sm-4 col-md-3 col-lg-2">
                      <button @click="backList" class="btn btn-secondary w-100">
                         返回列表
                      </button>
                  </div>
              </div>
          </div>
          </div>
        </div>
      </nav> -->
      <div class="container">
        <div class="row justify-content-center">
          <!-- 新增按钮 -->
          <div class="col-6 col-sm-4 col-md-3 col-lg-2">
            <button @click="changePatient" class="btn btn-primary w-100">
              选择患者
            </button>
          </div>
          <!-- 详情按钮 -->
          <!-- <div class="col-4 col-sm-4 col-md-3 col-lg-2">
                <button @click="addPatient" class="btn btn-info w-100">
                    新增患者
                </button>
            </div> -->
          <!-- 返回按钮 -->
          <div class="col-6 col-sm-4 col-md-3 col-lg-2">
            <button @click="backList" class="btn btn-secondary w-100">
              返回列表
            </button>
          </div>
        </div>
      </div>
      <!--中间区域 -->
      <div class="medium">
        <!--诊断反馈-->
        <div class="diagnosis">
          <p>其他信息录入</p>
          <div class="row mb-2">
            <div class="col">
              <label for="validationDefault01" class="col-sm-3 col-form-label">是否脓毒症患者：</label>
              <div class="input-group col-sm-9">
                <select class="form-select" v-model="isSetTime" aria-label="Default select example" @change="setTimeChange">
                  <option value="1">是</option>
                  <option value="0">否</option>
                </select>
                <button class="btn btn-primary" type="button" @click="upadteretrospective">提交</button>
              </div>
            </div>
          </div>
          <div class="row mb-2" v-if="isSetTime == 1">
            <div class="col">
              <label for="validationDefault01" class="col-sm-3 col-form-label">脓毒症确诊时间：</label>
              <div class="input-group col-sm-9">
                <input type="text" step="1" id="validationDefault01" class="form-control" readonly
                  @click="showPicker('patientInfo.retrospectiveDiagnosedTime')" placeholder="脓毒症确诊时间"
                  v-model="patientInfo.retrospectiveDiagnosedTime">
                <button class="btn btn-primary" type="button" @click="upadteretrospective">提交</button>
              </div>
            </div>
          </div>
          <div class="row mb-2">
            <div class="col">
              <label for="validationDefault01" class="col-sm-3 col-form-label">28天内是否死亡：</label>
              <div class="input-group col-sm-9">
                <select class="form-select" v-model="patientInfo.isDieWithin28Days" aria-label="Default select example">
                  <option value="0">否</option>
                  <option value="1">是</option>
                  <option value="-1">未处理</option>
                  <option value="2">未知</option>
                </select>
                <button class="btn btn-primary" type="button" @click="upadisDie">提交</button>
              </div>
            </div>
          </div>
          <!-- /patient/upadte/retrospective/isDie -->
          <!-- 抗生素给药时间  antibiotic_time  
          微生物培养时间 culture_time  -->

          <div class="row mb-2">
            <div class="col">
              <label for="validationDefault02" class="col-sm-3 col-form-label">抗生素给药时间：</label>
              <div class="input-group col-sm-9">
                <input type="text" step="1" id="validationDefault02" class="form-control" readonly
                  @click="showPicker('antibiotic_time')" placeholder="抗生素给药时间" v-model="antibiotic_time">
                <!-- 日期选择器 -->
                <van-popup v-model:show="showPickerVisible" position="bottom">
                  <van-datetime-picker v-model="currentDate" type="datetime" title="选择日期" :min-date="minDate"
                    :max-date="maxDate" @confirm="onConfirm" @cancel="showPickerVisible = false"
                    :columns-order="['year','month', 'day', 'hour','minute']" :formatter="formatter" />
                </van-popup>
                <button class="btn btn-primary" type="button" @click="subantibioticMsg">提交</button>
              </div>
            </div>
          </div>
          <div class="alert alert-danger" role="alert">
            请添加每次的抗生素使用时间
          </div>
          <div class="row mb-2">
            <div class="col">
              <label for="validationDefault03" class="col-sm-3 col-form-label">微生物样本采集时间：</label>
              <div class="input-group col-sm-9">
                <input type="text" step="1" id="validationDefault03" class="form-control" readonly
                  @click="showPicker('culture_time')" placeholder="微生物样本采集时间" v-model="culture_time">
                <button class="btn btn-primary" type="button" @click="subcultureMsg">提交</button>
              </div>
            </div>
          </div>
          <div class="alert alert-danger" role="alert">
            请添加每次的微生物样本采集时间
          </div>
          <div class="row mb-2">
            <div class="col">
              <label for="validationDefault01" class="col-sm-3 col-form-label">其他检查：</label>
              <div class="input-group col-sm-9">
                <select class="form-select" v-model="patientInfo.othercheckname" aria-label="Default select example">
                  <option value="Medical_Imaging">影像检查</option>
                  <option value="Pathogen_Blood">病原检查</option>
                  <option value="Smear">涂片</option>
                </select>
              </div>
            </div>
          </div>
          <div class="row mb-2">
            <div class="col">
              <label for="validationDefault03" class="col-sm-3 col-form-label">检查时间：</label>
              <div class="input-group col-sm-9">
                <input type="text" step="1" id="validationDefault04" class="form-control" readonly
                  @click="showPicker('othercheck_time')" placeholder="其他检查时间" v-model="othercheck_time">
                <button class="btn btn-primary" type="button" @click="subotherMsg">提交</button>
              </div>
            </div>
          </div>
          <div class="alert alert-danger" role="alert">
            请添加每次的其他检查项目及时间
          </div>
          <!-- <div class="alert" role="alert">
            <van-button type="info">已完成实验和数据录入不再显示该患者</van-button>
          </div> -->
          <div class="container">
            <div class="row justify-content-center">
              <!-- 新增按钮 -->
              <div class="col-12 col-sm-4 col-md-3 col-lg-2">
                <button @click="endPatientCheck" class="btn btn-primary w-100">
                  已完成实验和数据录入不再显示该患者
                </button>
              </div>
            </div>
          </div>
          <!-- 回顾性信息 -->
          <ol class="list-group list-group-numbered" style="max-height: 40vh;overflow-y: auto;">
            <li v-for="item in RetrospectiveinformationList"
              class="list-group-item d-flex justify-content-between align-items-start">
              <div class="ms-2 me-auto">
                <div class="col">
                  {{item.checkedDate}}
                </div>
                <div class="col">
                  {{item.createdBy}}
                </div>
                {{item.name}}
              </div>
              <span class="badge text-danger rounded-pill" @click="Retrosdel(item)">删除</span>
            </li>
          </ol>
        </div>
      </div>
      <!-- 页脚 -->
      <div id="footer">
        <a href="basicInfo.html">基础信息</a>
        <a href="biochemical_signs.html">生化及体征</a>
        <a class="AIButton" href="AI_diagnosis_treament.html">
          AI预警
          <div class="spinner-grow text-danger" v-if="patientInfo.confirmColor == 'red'" role="status">
            <span class="visually-hidden">Loading...</span>
          </div>
          <div class="spinner-grow text-warning" v-if="patientInfo.confirmColor == 'yellow'" role="status">
            <span class="visually-hidden">Loading...</span>
          </div>
        </a>
        <a href="javascript:;" class="active">其它信息录入</a>
      </div>
    </div>
    <!-- 切换患者 -->
    <div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
      aria-labelledby="staticBackdropLabel" aria-hidden="true">
      <div class="modal-dialog modal-dialog-scrollable">
        <div class="modal-content">
          <div class="modal-header">
            <h1 class="modal-title fs-5" id="staticBackdropLabel">选择患者</h1>
            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
          </div>
          <div class="modal-body">
            <ol class="list-group list-group-numbered">
              <li @click="changePatientHander(item)" v-for="item in AllPatientList" v-show="!item.is_finished"
                class="list-group-item d-flex justify-content-between align-items-start"
                v-bind:class="{ active: item.patientInfoId == patientInfo.patientInfoId}">
                <div class="ms-2 me-auto">
                  <div class="fw-bold">{{decryption(item.patientId)}}</div>
                  {{decryption(item.name)}}<span v-if="item.isDiagnosedWithSepsis == '1' || item.isPatientDischarged == '1' || item.isPatientDie == '1'">✔</span>
                </div>
              </li>
            </ol>
          </div>
        </div>
      </div>
    </div>
    <!-- 二次确认 -->
    <!-- !-- 模态框（二次确认） -->
    <div class="modal fade" id="confirmModaldel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
      aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <h4 class="modal-title" id="myModalLabel">确认操作</h4>
            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
          </div>
          <div class="modal-body">
            您确定要执行此操作吗？
          </div>
          <div class="modal-footer">
            <!-- <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> -->
            <button type="button" class="btn btn-primary" @click="todel">确认</button>
          </div>
        </div>
      </div>
    </div>
  </div>

  <script type="text/javascript" src="../../js/tool/vue.js"></script>
  <script type="text/javascript" src="../../js/tool/vant.min.js"></script>
  <script type="text/javascript" src="../../js/tool/jquery.js"></script>
  <script type="text/javascript" src="../../js/tool/dayjs.min.js"></script>
  <script type="text/javascript" src="../../js/tool/toastr.min.js"></script>
  <script type="text/javascript" src="../../js/common.js"></script>
  <script type="text/javascript" src="../../js/mixin.js"></script>
  <script type="text/javascript" src="../../js/reviewdata.js"></script>
  <script type="text/javascript" src="../../js/tool/bootstrap.min.js"></script>
</body>

</html>